<?php

namespace App\Trip\Traits\TimeTraits;

use Carbon\Carbon;

trait DateTimeTrait
{
    public function isDatetime(string $dateTime): bool
    {
        return Carbon::hasFormat($dateTime, 'Y-m-d H:i:s') || Carbon::hasFormat($dateTime, 'Y-m-d H:i');
    }
}